﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrderFulfillmentReport.aspx.cs"
    Inherits="Skyworth.CRM.Web.Orders.LetterOfAdvice" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>订单执行情况报表</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <%--[if IE]>
     <link href="../themes/css/ieHack.css" rel="stylesheet" type="text/css" />
    <![endif]--%>
    <link href="../themes/<%= Request.Cookies["dwz_theme"]!=null? Request.Cookies["dwz_theme"].Value:"default" %>/style.css"
        rel="stylesheet" type="text/css" />
    <link href="../themes/css/core.css" rel="stylesheet" type="text/css" />
    <link href="../themes/css/pages.css" rel="stylesheet" type="text/css" />
    <link href="../themes/css/wbox.css" rel="stylesheet" type="text/css" />
    <link href="../themes/css/Messagebox.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" media="screen" href="../themes/JQuery-UI-1.8.16/jquery-ui-1.8.16.custom.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="../themes/ui.jqgrid.css" />

    <script src="../javascripts/jquery-1.4.4.min.js" type="text/javascript"></script>

    <script type="text/javascript" src="../javascripts/jquery-ui-1.8.16.js"></script>

    <script src="../javascripts/jquery.layout-1.3.js" type="text/javascript"></script>

    <script src="../javascripts/json2.js" type="text/javascript"></script>

    <script src="../javascripts/dwz.core.js" type="text/javascript"></script>

    <%--<script src="../javascripts/dwz.pagination.js" type="text/javascript"></script>--%>

    <script type="text/javascript" charset="utf-8" src="../javascripts/JGrid4.2.0/i18n/grid.locale-cn.js"></script>

    <script type="text/javascript" charset="utf-8" src="../javascripts/JGrid4.2.0/grid.base.js"></script>

    <script type="text/javascript" charset="utf-8" src="../javascripts/JGrid4.2.0/grid.common.js"></script>

    <script type="text/javascript" charset="utf-8" src="../javascripts/JGrid4.2.0/grid.formedit.js"></script>

    <script type="text/javascript" charset="utf-8" src="../javascripts/JGrid4.2.0/grid.custom.js"></script>

    <script type="text/javascript" charset="utf-8" src="../javascripts/JGrid4.2.0/grid.postext.js"></script>

    <script type="text/javascript" charset="utf-8" src="../javascripts/JGrid4.2.0/jquery.fmatter.js"></script>

    <script type="text/javascript" charset="utf-8" src="../javascripts/JGrid4.2.0/JsonXml.js"></script>

    <link type="text/css" rel="stylesheet" href="../themes/layout-default-latest.css" />

    <script src="../javascripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>

    <script type="text/javascript">
        function setHeight() {
            jQuery("#list").jqGrid('setGridHeight', $(".ui-layout-content").height() - $(".ui-layout-content .ui-jqgrid-titlebar").height() - $(".ui-layout-content .ui-jqgrid-hdiv").height() - $(".ui-layout-content #pager").height() - 11).jqGrid('setGridWidth', "100%");
            
        }
        $(document).ready(function() {
            var layout = $('body').layout({
                center__minHeight: 385,
                center__onresize: function() {
                    setHeight();
                }
            });
            //layout.allowOverflow("center");

            $("div.panelBar li").hover(function() { $(this).addClass("hover"); },
                                     function() { $(this).removeClass("hover"); })
            $("input[type=text]").addClass("textInput").focusClass("focus");
            
            $("#list").jqGrid({
                datatype: getLetterOfAdvice,
                mtype: 'POST',
                colNames: ['Fitemid', '订单状态', '销售订单号', '客户', '销售订单制单时间', '销售订单审核时间', '订单交易条件', '订单付款条件', '订单业务员','销售部门','产品名称','产品规格型号','销售订单数量','订单单价','订单税额','订单含税金额','未关联通知单数量','订单未交货数量','发货通知单单号','通知单制单日期','通知单审核日期','发货通知单数量','销售出库单单号','销售出库单制单日期','审核日期','销售出库单数量','发货仓库','发货人'],
                colModel: [
                  { name: 'Fitemid', index: 'Fitemid', hidden: true },
                  { name: 'FSaleStockID', index: 'FSaleStockID' },
                  { name: 'Fproductid', index: 'Fproductid' },
                  { name: 'FOrderID', index: 'FOrderID' },
                  { name: 'FOrdernumber', index: 'FOrdernumber' },
                  { name: 'FDate', index: 'FDate', formatter: JosnDateFormatter },
                  { name: 'FProductnumber', index: 'FProductnumber' },
                  { name: 'FProductname', index: 'FProductname' },
                  { name: 'Funit', index: 'Funit', align: "center" },
                  { name: 'FQTy', index: 'FQTy', align: "right", formatter: 'number' },
                  { name: 'FPrice', index: 'FPrice', align: "right", formatter: 'currency' },
                  { name: 'FAmount', index: 'FAmount', align: "right", formatter: 'currency' },
                  { name: 'FisR', index: 'FisR', align: "center", formatter: 'checkbox' },
                  { name: 'FSaleStockID', index: 'FSaleStockID' },
                  { name: 'Fproductid', index: 'Fproductid' },
                  { name: 'FOrderID', index: 'FOrderID' },
                  { name: 'FOrdernumber', index: 'FOrdernumber' },
                  { name: 'FDate', index: 'FDate', formatter: JosnDateFormatter},
                  { name: 'FProductnumber', index: 'FProductnumber'},
                  { name: 'FProductname', index: 'FProductname'},
                  { name: 'Funit', index: 'Funit', align: "center"},
                  { name: 'FQTy', index: 'FQTy', align: "right", formatter: 'number'},
                  { name: 'FPrice', index: 'FPrice', align: "right", formatter: 'currency'},
                  { name: 'FAmount', index: 'FAmount', align: "right", formatter: 'currency'},
                  { name: 'FisR', index: 'FisR', align: "center", formatter: 'checkbox'},
                  { name: 'FPrice', index: 'FPrice', align: "right", formatter: 'currency'},
                  { name: 'FAmount', index: 'FAmount', align: "right", formatter: 'currency'},
                  { name: 'FisR', index: 'FisR', align: "center", formatter: 'checkbox'}
                ],
                pager: '#pager',
                pagerpos: "left",
                multiselect: false,
                rowNum: 20,
                rowList: [20, 10, 30, 40, 50],
                sortname: 'Fnumber',
                sortorder: 'desc',
                viewrecords: true,
                gridview: true,
                height: 520,
                autowidth: true,
                rownumbers: true,
                caption: '订单执行情况',
                jsonReader: {
                    repeatitems: false,
                    id: "Fitemid",
                    root: "rows",
                    page: "page",
                    total: "total",
                    records: "records"
                }               
            });
        });
        function JosnDateFormatter(cellvalue, options, rowObject) {
            var newDate = eval("new " + cellvalue.replace(/\//g, ""));
            var month = newDate.getMonth() + 1;
            month = month < 10 ? "0" + month : month;
            var date = newDate.getDate();
            date = date < 10 ? "0" + date : date;
            return newDate.getFullYear() + "-" + month + "-" + date;
        }

        function getLetterOfAdvice(postdata) {

        }
     
    </script>

</head>
<body>
    <div class="ui-layout-center">
        <div class="pane-header">
            <form id="form1" runat="server">
            <table width="100%" id="QueryArea">
                <tr>
                    <td>
                        <div class="searchBar searchPanel">
                            <table>
                                <tr>
                                    <td class="floatLeft">
                                        <span>销售订单单号：</span>
                                        <asp:TextBox ID="txtCode" runat="server"></asp:TextBox>
                                    </td>
                                    <td class="paddingLeft10 clearBoth">
                                        <div class="buttonActive">
                                            <div class="buttonContent">
                                                <asp:Button ID="btnSearch" runat="server" Text="查询" ToolTip="查询订单执行情况" CssClass="serverButton"
                                                    CommandArgument="5" />
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <hr />
                    </td>
                </tr>
                <tr>
                    <td>
                        <table>
                            <tr>
                                <td class="floatLeft">
                                    <span>物流公司：</span>
                                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                                </td>
                                <td class="floatLeft paddingLeft10">
                                    <span>车牌号码：</span>
                                    <asp:TextBox ID="txtStartDate" runat="server" ReadOnly="True"></asp:TextBox>
                                </td>
                                <td class="floatLeft paddingLeft10">
                                    <span>司机姓名：</span>
                                    <asp:TextBox ID="txtEndDate" runat="server" ReadOnly="True"></asp:TextBox>
                                </td>
                                <td class=" paddingLeft10 clearBoth">
                                    <span>司机电话：</span>
                                    <asp:TextBox ID="TextBox2" runat="server" ReadOnly="True"></asp:TextBox>
                                </td>
                            </tr>
                            <tr style="height: 8px;">
                            </tr>
                            <tr>
                                <td class="floatLeft">
                                    <span>目的地点：</span>
                                    <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
                                </td>
                                <td class="floatLeft paddingLeft10">
                                    <span>装货地点：</span>
                                    <asp:TextBox ID="TextBox4" runat="server" ReadOnly="True"></asp:TextBox>
                                </td>
                                <td class="floatLeft paddingLeft10">
                                    <span>订仓号码：</span>
                                    <asp:TextBox ID="TextBox5" runat="server" ReadOnly="True"></asp:TextBox>
                                </td>
                                <td class="paddingLeft10 clearBoth">
                                    <span>船名行次：</span>
                                    <asp:TextBox ID="TextBox6" runat="server" ReadOnly="True"></asp:TextBox>
                                </td>
                            </tr>
                            <tr style="height: 8px;">
                            </tr>
                            <tr>
                                <td class="floatLeft">
                                    <span>出货时间：</span>
                                    <asp:TextBox ID="TextBox7" runat="server"></asp:TextBox>
                                </td>
                                <td class="floatLeft paddingLeft10">
                                    <span>出货客户：</span>
                                    <asp:TextBox ID="TextBox8" runat="server" ReadOnly="True"></asp:TextBox>
                                </td>
                                <td class="floatLeft paddingLeft10">
                                    <span>订单号码：</span>
                                    <asp:TextBox ID="TextBox9" runat="server" ReadOnly="True"></asp:TextBox>
                                </td>
                                <td class="paddingLeft10 clearBoth">
                                    <span>产品名称：</span>
                                    <asp:TextBox ID="TextBox10" runat="server" ReadOnly="True"></asp:TextBox>
                                </td>
                            </tr>
                            <tr style="height: 8px;">
                            </tr>
                            <tr>
                                <td class="floatLeft">
                                    <span>规格型号：</span>
                                    <asp:TextBox ID="TextBox11" runat="server"></asp:TextBox>
                                </td>
                                <td class="floatLeft paddingLeft10">
                                    <span>出货数量：</span>
                                    <asp:TextBox ID="TextBox12" runat="server" ReadOnly="True"></asp:TextBox>
                                </td>
                                <td class="floatLeft paddingLeft10">
                                    <span>出货单价：</span>
                                    <asp:TextBox ID="TextBox13" runat="server" ReadOnly="True"></asp:TextBox>
                                </td>
                                <td class=" paddingLeft10 clearBoth">
                                    <span>出货金额：</span>
                                    <asp:TextBox ID="TextBox14" runat="server" ReadOnly="True"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                 <tr style="height: 8px;">
                    <td><hr /></td>
                 </tr>
            </table>
            </form>
        </div>
        <div class="ui-layout-content">
            <table id="list">
            </table>
            <div id="pager">
            </div>
        </div>
    </div>
</body>
</html>
